import request from "@/utils/request";

// 登录获取token 测试
// export function getToken(data) {
//   return request({
//     url: '/api/admin_login',
//     method: 'post',
//     data: data
//   })
// }

// 测试传角色id
export function getTestToken(data) {
    return request({
        url: "/api/test_login",
        method: "post",
        data: data,
    });
}

// 登录获取token 正式
export function getToken(data) {
    return request({
        url: "/api/login",
        method: "post",
        data: data,
    });
}

// 获取用户信息
export function getUserInfo(data) {
    return request({
        url: "/api/user_info",
        method: "post",
        data: data,
    });
}

// 获取lnr列表
export function getLnr(data) {
    return request({
        url: "/api/lnr_lists",
        method: "post",
        data: data,
    });
}

// 添加lnr
export function addLnr(data) {
    return request({
        url: "/api/lnr_create",
        method: "post",
        data: data,
    });
}

// 修改lnr
export function updateLnr(data) {
    return request({
        url: "/api/lnr_update",
        method: "post",
        data: data,
    });
}

// 获取lnr详情
export function getLnrDetail(data) {
    return request({
        url: "/api/lnr_detail",
        method: "post",
        data: data,
    });
}

// 获取销售列表
export function getUserLists(data) {
    return request({
        url: "/api/user_lists",
        method: "post",
        data: data,
    });
}

// 获取我的销售列表
export function getMyUserLists(data) {
    return request({
        url: "/api/user_lnr_lists",
        method: "post",
        data: data,
    });
}

// 获取酒店的的lnr列表
export function getHotelLnr(data) {
    return request({
        url: "/api/hotel_lnr_lists",
        method: "post",
        data: data,
    });
}

// lnr 转移分配
export function assignLnr(data) {
    return request({
        url: "/api/lnr_transfer",
        method: "post",
        data: data,
    });
}

// lnr修改是否分享
export function setLnrShare(data) {
    return request({
        url: "/api/lnr_share_update",
        method: "post",
        data: data,
    });
}

// lnr 审核
export function lnrVerify(data) {
    return request({
        url: "/api/lnr_verify",
        method: "post",
        data: data,
    });
}

// 发送邮件
export function excelExport(data) {
    return request({
        url: "/api/excel_export",
        method: "post",
        data: data,
    });
}

// 业绩报告
export function getRegion(data) {
    return request({
        url: "/api/region_user",
        method: "post",
        data: data,
    });
}

// 关闭首次进入弹窗
export function openMsg(data) {
    return request({
        url: "/api/open_msg",
        method: "post",
        data: data,
    });
}

// js_config
export function getWxConfig(data) {
    return request({
        url: "/api/js_config",
        method: "post",
        data: data,
    });
}

// js_agent_config
export function getWxAgentConfig(data) {
    return request({
        url: "/api/js_agent_config",
        method: "post",
        data: data,
    });
}

// 待审核数量
export function verifyCount(data) {
    return request({
        url: "/api/verify_count",
        method: "post",
        data: data,
    });
}

// 大区发送邮件
export function exportRegion(data) {
    return request({
        url: "/api/excel_export_region",
        method: "post",
        data: data,
    });
}

// 分享
export function share(data) {
    return request({
        url: "/api/share",
        method: "post",
        data: data,
    });
}

// CTP年度目标
export function targetInfo(data) {
    return request({
        url: "/api/target_info",
        method: "post",
        data: data,
    });
}

// 大区发送CTP年度目标报表邮件
export function targetExportRegion(data) {
    return request({
        url: "/api/target_export_region",
        method: "post",
        data: data,
    });
}

// CTP年度目标大区端
export function targetInfoRegion(data) {
    return request({
        url: "/api/target_info_region",
        method: "post",
        data: data,
    });
}

// 启用/不启用用户
export function enableUser(data) {
    return request({
        url: "/api/enable_user",
        method: "post",
        data: data,
    });
}

// BE酒店客户
export function beHotelLnrLists(data) {
    return request({
        url: "/api/be_hotel_lnr_lists",
        method: "post",
        data: data,
    });
}

// BE销售表现
export function beUserLists(data) {
    return request({
        url: "/api/be_user_lists",
        method: "post",
        data: data,
    });
}

// BE_LNR 转移
export function beLnrTransfer(data) {
    return request({
        url: "/api/be_lnr_transfer",
        method: "post",
        data: data,
    });
}

// BE销售LNR明细（老的查看销售LNR明细）
export function beUserLnrLists(data) {
    return request({
        url: "/api/be_user_lnr_lists",
        method: "post",
        data: data,
    });
}

// BE销售LNR
export function beLnrLists(data) {
    return request({
        url: "/api/be_lnr_lists",
        method: "post",
        data: data,
    });
}

// BE报表导出
export function beExcelExport(data) {
    return request({
        url: "/api/be_excel_export",
        method: "post",
        data: data,
    });
}

// BElnr录入
export function beLnrCreate(data) {
    return request({
        url: "/api/be_lnr_create",
        method: "post",
        data: data,
    });
}

// BElnr详情
export function beLnrDetail(data) {
    return request({
        url: "/api/be_lnr_detail",
        method: "post",
        data: data,
    });
}

// BElnr修改
export function beLnrUpdate(data) {
    return request({
        url: "/api/be_lnr_update",
        method: "post",
        data: data,
    });
}

// banner 列表
export function banner(data) {
    return request({
        url: "/api/banner",
        method: "post",
        data: data,
    });
}

// BE一键分享 计数
export function be_share(data) {
    return request({
        url: "/api/be_share",
        method: "post",
        data: data,
    });
}

// aio_qrcode 二维码
export function aio_qrcode(data) {
    return request({
        url: "/api/aio_qrcode",
        method: "post",
        data: data,
    });
}

// 上传oss
export function ossUpload(data) {
    return request({
        url: "/api/upload",
        method: "post",
        data,
		headers: {
			'Content-Type': 'multipart/form-data'
		}
    });
}


//获取前台活动开启按钮
export function get_front_config(data) {
    return request({
        url: "/api/get_front_config",
        method: "post",
        data: data,
    });
}

// export function getUser(params) {
//   return request({
//     url: '/api/help3/userid',
//     method: 'get',
//     params
//   })
// }
